package org.dromara.exam.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.exam.domain.dto.AnswerExamInfo;
import org.dromara.exam.domain.dto.AnswerMetaInfo;
import org.dromara.exam.domain.dto.TemplateSchema;
import org.dromara.exam.domain.entity.ExamAnswer;
import org.dromara.exam.enums.ExamExerciseTypeEnum;

import java.util.LinkedHashMap;
import java.util.List;

/**
 * 答卷业务对象 exam_answer
 *
 * @author xiyin321
 * @date 2024-05-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ExamAnswer.class, reverseConvertGenerate = false)
public class ExamAnswerBo extends BaseEntity {

    /**
     *
     */
    @NotNull(message = "不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 项目ID
     */
    @NotNull(message = "项目ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long projectId;

    /**
     * 项目内容
     */
//    @NotBlank(message = "项目内容不能为空", groups = {AddGroup.class, EditGroup.class})
    private TemplateSchema survey;

    /**
     * 暂存答案
     */
//    @NotBlank(message = "暂存答案不能为空", groups = {AddGroup.class, EditGroup.class})
    private LinkedHashMap<String, Object> tempAnswer;

    /**
     * 答案
     */
//    @NotBlank(message = "答案不能为空", groups = {AddGroup.class, EditGroup.class})
    private LinkedHashMap<String, Object> answer;
    /**
     * 项目数据
     */
//    @NotBlank(message = "项目数据不能为空", groups = {AddGroup.class, EditGroup.class})
    private AnswerMetaInfo metaInfo;

    /**
     * 0暂存 1已完成
     */
//    @NotBlank(message = "0暂存 1已完成不能为空", groups = {AddGroup.class, EditGroup.class})
    private String tempSave;

    /**
     * 考试信息
     */
//    @NotBlank(message = "考试信息不能为空", groups = {AddGroup.class, EditGroup.class})
    private AnswerExamInfo examInfo;

    /**
     * 考试练习类型
     */
//    @NotBlank(message = "考试练习类型不能为空", groups = {AddGroup.class, EditGroup.class})
//    private ExamExerciseTypeEnum examExerciseType;

    /**
     * 考试分数
     */
//    @NotNull(message = "考试分数不能为空", groups = {AddGroup.class, EditGroup.class})
    private Double examScore;

    /**
     * 备注信息
     */
    private String remark;

}
